{{csrf_field()}}
<div class="layui-form-item" >
    <label class="layui-form-label">选择城市 *</label>
    <div class="layui-input-inline" >
        <select name="province" id="province" lay-verify="required" lay-filter="myselect">
            <option value="">请选择</option>
            @foreach($area as $a)
                <option value="{{$a->id}},{{$a->name}}" @if(isset($metro->province_id)&&$metro->province_id==$a->id)selected @endif>{{$a->name}}</option>
            @endforeach
        </select>
    </div>
    <div class="layui-input-inline" id="city" @if(isset($metro->region_id) && $metro->region_id > 0) style="display:inline;" @endif>
        <select name="region" id="region" lay-verify="required" lay-filter="myselect2" >
            @if(isset($metro->region_id) && $metro->region_id > 0)
                <option value="{{$metro->region_id}},{{$metro->region}}">{{$metro->region}}</option>
            @endif
        </select>
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">地铁线路 *</label>
    <div class="layui-input-inline">
        <input type="text" name="name" value="{{$metro->name??old('name')}}" lay-verify="required" placeholder="请输入地铁线路名称" class="layui-input" >
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">排序</label>
    <div class="layui-input-inline">
        <input type="text" name="sort" value="{{$metro->sort??old('sort',0)}}" placeholder="填写数字" class="layui-input" >
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">状态</label>
    <div class="layui-input-block">
        <input type="radio" name="status" value="T" title="启用" @if(isset($metro->status) && $metro->status == 'T') checked @elseif(!isset($metro->status)) checked @endif>
        <input type="radio" name="status" value="F" title="禁用" @if(isset($metro->status) && $metro->status == 'F') checked @endif>
    </div>
</div>
<div class="layui-form-item">
    <div class="layui-input-block">
        <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formDemo">确 认</button>
        <a  class="layui-btn" href="{{route('admin.metro')}}" >返 回</a>
    </div>
</div>